<?php 
	class StoreTagViewModel extends ViewModel{
		public $table = 'store';
		public $view =array(
	 		'store' => array(
	 			'_type' => 'INNER'
	 			),
			'tagstore' => array(
				'_on'  => '__store__.stid=__tagstore__.stid',
				 '_type' => 'INNER'
			),

			'tag' => array(
				 '_on'  => '__tag__.tid=__tagstore__.tid',
				 '_type' => 'INNER'
			),


			
        );


         public function get_data($obj=NULL){
	 	return $this->group($obj)->all();

	 }

	 public function get_one_data($where=NULL){
	 	return $this->where($where)->find();

	 }

	}


 ?>